package com.hzncc.flowable_diboot.contract.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
* 销售合同扩展信息 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-09-18
* Copyright © MyCorp
*/

@TableName("mdl_sales_contract_ext")
@Getter @Setter @Accessors(chain = true)
public class SalesContractExt extends BaseModel {
    private static final long serialVersionUID = 1359366334490023286L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 合同类型
     */
    @TableField()
    private String contractType;

    /**
     * 合同附件类型
     */
    @TableField()
    private String contractAttachmentType;

    /**
     * 是否上传附件
     */
    @TableField()
    private Boolean isAttachmentUploaded;

    /**
     * 合同附件
     */
    @TableField()
    private String contractAttachment;

    /**
     * 机床类型
     */
    @TableField()
    private String machineToolType;

    /**
     * 内部核算标准
     */
    @TableField()
    private String internalAccountingStandard;

    /**
     * 合同折扣权限
     */
    @TableField()
    private String contractDiscountAuthority;

    /**
     * 结算方式及期限
     */
    @TableField()
    private String settlementMethodAndDeadline;

    /**
     * 内部核算依据
     */
    @TableField()
    private BigDecimal internalAccountingBasis;

    /**
     * 合同文本
     */
    @TableField()
    private String contractText;

    /**
     * 收货回执状态
     */
    @TableField()
    private String receiptStatusOfGoods;

    /**
     * 公司合同类型
     */
    @TableField()
    private String companyContractType;

    /**
     * 产品类型
     */
    @TableField()
    private String productType;

    /**
     * 计划交货时间
     */
    @TableField()
    private LocalDate plannedDeliveryTime;

    /**
     * 最终用户
     */
    @Length(max=100, message="最终用户长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String finalUser;

    /**
     * 档次
     */
    @TableField()
    private String grade;

    /**
     * 销售部门
     */
    @TableField()
    private String salesDepartment;

    /**
     * 销售组
     */
    @Length(max=100, message="销售组长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String salesGroup;

    /**
     * 销售地区
     */
    @Length(max=100, message="销售地区长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String salesRegion;

    /**
     * 配套编码
     */
    @Length(max=100, message="配套编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String supportingCode;

    /**
     * 配套机床
     */
    @Length(max=100, message="配套机床长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String supportingMachineTool;

    /**
     * 备注
     */
    @Length(max=100, message="备注长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String remarks;

    /**
     * 客户负责人
     */
    @Length(max=100, message="客户负责人长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String customerResponsiblePerson;

    /**
     * 客户销售员
     */
    @Length(max=100, message="客户销售员长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String customerSalesperson;

    /**
     * 销售合同id
     */
    @Length(max=32, message="销售合同id长度应小于32")
    @TableField()
    private String salesContractId;


}